package com.fitness.front.convertor;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fitness.front.modal.news.dto.NewsDto;
import com.fitness.front.modal.news.entity.News;
import com.fitness.front.modal.news.vo.NewsVO;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper(componentModel = "spring")
public interface NewsConvertor {
    NewsVO entity2Vo(News result);

    Page<NewsVO> entity2vo(Page<News> retPage);

    News dto2Entity(NewsDto newsDto);

    List<NewsVO> entities2VOs(List<News> news);
}
